package com.automobile.dao;

import java.util.List;

import org.apache.ibatis.annotations.CacheNamespace;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import com.automobile.domain.CarBrand;

@Repository
public interface CarBrandDao {
	
	@Select("select * from brand")
	List<CarBrand> findCarBrandAll();
	
	@Select("select id from brand where name = #{name}")
	int findIdByName(String name);

	@Select("select name from brand where id = #{id}")
    String findBrandNameById(int id);
	
}
